<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <style>
        .fream-top-right>ul>li:hover>.margin0{
            margin:-10px -4px 0px;
        }
    </style>
    <link type="text/css" id="href1" rel="stylesheet" href="${static}/skin/blue/blue.css">
    <link type="text/css" id="href" rel="stylesheet" href="${static}/skin/black/black.css">


    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">

    <!--<base href="http://localhost:8888/"></base>-->
    <title>捷布森权限管理系统</title>
    <style>
        /* 滚动条样式：(有浏览器兼容问题) */
        /*滚动条 start*/
        ::-webkit-scrollbar {
            width: 7px;
            height: 7px;
            background-color: #757575;
        }
        /*定义滚动条轨道 内阴影+圆角*/
        ::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
            background: #fff ;
        }
        /*定义滑块 内阴影+圆角*/
        ::-webkit-scrollbar-thumb {
            border-radius: 3px;
            -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
            background-color:#757575;
        }

    </style>
    <style>
        .fream-first-menu{
            float: left;
            height:60px;
            margin-left:100px;
        }
        .fream-first-menu ul li{
            height: 60px;
            float: right;
            position: relative;
            width:90px;
            color: white;
            padding:12px;
        }
        .fream-first-menu ul li:hover{
            background:#69BBF6;
            cursor: pointer;
        }
        .fream-first-menu ul li span{
            display:block;
            height:25px;
            width:100%;
            text-align: center;
        }
        .active-first-menu-color{
            background:#69BBF6
        }

    </style>

    <link rel="shortcut icon" type="image/x-icon" href="img/icon/favicon.ico" media="screen">
    <!-- 框架样式 -->
    <link type="text/css" rel="stylesheet" href="${static}/fonts/font-icons.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/layui/css/layui.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/datatable/media/css/dataTables.bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/bootstrap-select/css/bootstrap-select.min.css?r=0.020456797551074324">
    <link rel="stylesheet" type="text/css" href="${static}/plugin/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/radioCheckBox/src/pretty.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/materialdesignicons/css/materialdesignicons.min.css">
    <!--<link async rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css"/>-->
    <link type="text/css" rel="stylesheet" href="${static}/plugin/radioCheckBox/src/pretty.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/drag/drag.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/calendar/simple-calendar.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/weather/leoweather.css">
    <link rel="stylesheet" type="text/css" href="${static}/plugin/imgupload/css/cropper.min.css?r=0.6207188189209538">
    <link rel="stylesheet" type="text/css" href="${static}/plugin/imgupload/css/mui.min.css?r=0.9207463414125734">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/jquery-plugin-circliful-master/css/jquery.circliful.css">

    <!-- 自定义样式 -->
    <link type="text/css" rel="stylesheet" href="${static}/css/fream.css"> <!-- 顶部和侧边 -->
    <link type="text/css" rel="stylesheet" href="${static}/css/iconfont.css">
    <link type="text/css" rel="stylesheet" href="${static}/css/main.css?r=0.4389791385058335">
    <link type="text/css" rel="stylesheet" href="${static}/css/nav.css">
    <link rel="stylesheet" type="text/css" href="${static}/css/processHelper.css?r=0.07160859914374484">
    <link type="text/css" rel="stylesheet" href="${static}/css/dtable.css">
    <link type="text/css" rel="stylesheet" href="${static}/page/back/firstpage/css/firstpage.css"><!-- 主页css -->
    <link type="text/css" rel="stylesheet" href="${static}/css/btn.css">
    <link type="text/css" rel="stylesheet" href="${static}/page/back/device/css/icon.css">

    <link type="text/css" rel="stylesheet" href="${static}/page/back/customprint/file/cpTemple.css">
    <link type="text/css" rel="stylesheet" href="${static}/js/utils/listRight/listRight.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/checkBox/dist/checkbox.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/page/back/maintainRecord/swiper/swiper.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/js/utils/slider/slider.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/select2-develop/dist/css/select2.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/wdScrollTab/css/TabPanel.css?V4.1-03082101">
    <link type="text/css" rel="stylesheet" href="${static}/css/adminlte.min.css">
    <link type="text/css" rel="stylesheet" href="${static}/css/common.css">
    <link type="text/css" rel="stylesheet" href="${static}/plugin/toastr/toastr.css">



    <script type="text/javascript" src="${static}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${static}/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${static}/plugin/layer/layer.js"></script>
    <script type="text/javascript" src="${static}/plugin/layui/layui.js"></script>
    <script type="text/javascript" src="${static}/plugin/countdown/countdown.js"></script>
    <script type="text/javascript" src="${static}/js/i-jquery.js?r=85145"></script>

    <script type="text/javascript" src="${static}/js/imgClickBig.js"></script>
    <script type="text/javascript" src="${static}/js/jquery.cookie.min.js?v=123456"></script>
    <script type="text/javascript" src="${static}/plugin/datatable/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" src="${static}/plugin/datatable/media/js/dataTables.bootstrap.js"></script>
    <script type="text/javascript" src="${static}/js/jquery.timeago.js"></script>
    <script type="text/javascript" src="${static}/js/jquery.form.js"></script>
    <script type="text/javascript" src="${static}/plugin/bootstrap-select/js/bootstrap-select.js"></script>
    <script type="text/javascript" src="${static}/plugin/drag/drag.js"></script>
    <script type="text/javascript" src="${static}/plugin/calendar/simple-calendar.js"></script>
    <script type="text/javascript" src="${static}/plugin/weather/jquery.leoweather.min.js"></script>
    <script type="text/javascript" src="${static}/js/material-decomposition.js?r=123sdf"></script>
    <script type="text/javascript" src="${static}/js/processHelper.js?r=324242"></script>
    <script type="text/javascript" src="${static}/js/checkGroup.js?r=85145"></script>
    <script type="text/javascript" src="${static}/js/iDistpicker.js?r=85145"></script>
    <script type="text/javascript" src="${static}/plugin/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${static}/plugin/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <script type="text/javascript" src="${static}/js/pmHelper.js"></script>
    <script type="text/javascript" src="${static}/js/formUtil.js"></script>
    <script type="text/javascript" src="${static}/js/layer-date-format.js"></script>
    <script type="text/javascript" src="${static}/js/dateUtil.js"></script>
    <script type="text/javascript" src="${static}/js/iUpload.js"></script>
    <script type="text/javascript" src="${static}/plugin/eachrt4.1/echarts.js"></script>
    <script type="text/javascript" src="${static}/plugin/jquery-plugin-circliful-master/js/jquery.circliful.js"></script>
    <script type="text/javascript" src="${static}/plugin/utils/numberUtils.js"></script>
    <script type="text/javascript" src="${static}/js/checkWindowClose.js"></script>
    <script type="text/javascript" src="${static}/js/utils/common/fileUtils.js"></script>
    <script type="text/javascript" src="${static}/js/utils/common/arrayUtils.js"></script>
    <script type="text/javascript" src="${static}/js/utils/common/arrayUtils.js"></script>
    <script type="text/javascript" src="${static}/js/utils/common/formUtil.js"></script>
    <script type="text/javascript" src="${static}/js/utils/common/layer-tip.js"></script>

    <script type="text/javascript" src="${static}/plugin/select2-develop/dist/js/select2.js"></script>
    <script type="text/javascript" src="${static}/plugin/select2-develop/dist/js/pinyin.js"></script>

    <!-- 生成二维码-->
    <script type="text/javascript" src="${static}/plugin/qrcode/jquery.qrcode.js"></script>
    <script type="text/javascript" src="${static}/plugin/qrcode/qrcode.js"></script>
    <script type="text/javascript" src="${static}/plugin/qrcode/utf.js"></script>
    <script type="text/javascript" src="${static}/plugin/JsBarcode-master/dist/JsBarcode.all.js"></script>

    <!-- 树插件 -->
    <link rel="stylesheet" href="${static}/plugin/ztree/zTreeStyle/zTreeStyle.css" />
    <script type="text/javascript" src="${static}/plugin/ztree/jquery.ztree.all-3.5.min.js"></script>
    <script type="text/javascript" src="${static}/js/PullDownTreeUtil2.js"></script>
    <script src="${static}/plugin/jsPlumb/js/jsplumb.js"></script>
    <script src="${static}/plugin/jsPlumb/flowchart-util.js"></script>

    <script src="${static}/js/utils/listRight/listRightUtil.js"></script>
    <script src="${static}/js/utils/checkUtils/checkUtils.js"></script>
    <script src="${static}/page/back/patrolStatic/js/utils.js"></script>
    <script src="${static}/js/utils/slider/slider.js"></script>
    <script src="${static}/page/back/shuju/js/fullscreen.js"></script>
    <script src="${static}/page/back/maintainRecord/swiper/swiper.min.js"></script>

    <script  src="${static}/plugin/datatable/JSZip-2.5.0/jszip.min.js"></script>
    <script  src="${static}/plugin/datatable/pdfmake-0.1.36/pdfmake.min.js"></script>
    <script  src="${static}/plugin/datatable/Buttons-1.5.6/js/dataTables.buttons.js"></script>
    <script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.flash.min.js"></script>
    <script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.html5.js"></script>
    <script  src="${static}/plugin/datatable/Buttons-1.5.6/js/buttons.print.js"></script>
    <script  src="${static}/js/utils/table2excel/table2excel.js"></script>
    <script  src="${static}/plugin/wdScrollTab/js/TabPanel.js"></script>
    <script  src="${static}/plugin/wdScrollTab/js/TabPanel.extend.js"></script>
    <script  src="${static}/plugin/wdScrollTab/js/TabPanel_i18n.js"></script>
    <script  src="${static}/js/common.js"></script>
    <script  src="${static}/js/sysIndex.js"></script>

    <script  src="${static}/plugin/toastr/toastr.js"></script>
    <link rel="icon shortcut bookmark" type="image/png" href="${static}/img/login/gipson-logo.png">

    <!-- commonUtil_1.js文件 bycjw-->
    <script src="${static}/js/commonUtil_1.js?version=1.0.0.1"></script>

    <!-- simple-line-icon样式文件 -->
    <link type="text/css" rel="stylesheet" href="${static}/plugin/simple-line-icons-2.4.1/css/simple-line-icons.css?version=1.0.0.1">

</head>

<body class="hold-transition fixed noscroll2 sidebar-mini ">
<script type="text/javascript" src="${static}/js/main.js?v=123"></script>
<div class="wrapper">
    <!--顶部-->
    <div class="fream-top" style="background-color:#23283f;">
        <!--logo部分-->
        <div class="fream-logo">
            <img class="sys_logo_value" src="${static}/img/login/gipson-logo.png" >
            <span class="sys_name_value">捷布森权限管理系统</span>
        </div>
        <div class="fream-top-right">
            <ul>
                <!--admin-->
                <li class="fream-admin" style="width: 180px;">
                    <img src="${static}/img/defaultuser.png">
                    <span class="admin" data-account = "demo">${currentUser.name!}</span>
                    <span class="glyphicon glyphicon-menu-down"></span>
                    <ul class="admin-hover" style="width: 180px;">
                        <!--<a href="manage#userinfo/list"><li>编辑用户信息</li></a>-->
                        <span onclick="passwordedit(this)"><li>修改用户密码</li></span>
                        <span onclick="logout()"><li>退出<span class="glyphicon glyphicon-off" style="float:right;color:red;"></span></li></span></a>
                    </ul>
                </li>
                <!--换肤-->
               <!-- <li class="fream-skin">
                    <a><span class="iconfont icon-skin"></span></a>
                    <div>换肤</div>
                    <ul class="skin">
                        <li><span></span></li>
                        <li ><span></span></li>
                    </ul>
                </li>-->
                <!--待办事项-->
                <!--<li class="matter">
                    <a><span class="iconfont icon-matter" onclick='$("#todoList").toggle()'></span></a>
                    <div>待办</div>
                    <i id="todoCount">0</i>
                    <dl id="todoList" style="box-shadow: darkgrey 1px 2px 15px 0px;">
                        <div class="parent">
                            <dd id="noTodo" style="color: #cecece;">无待办事项</dd>
                            <dd id="todoRepairCount"><a href="manage#reportingFaults/repairList?mainPage=reportingFaults/list"><img src="img/daiban/1.png">待维修<i class="num">0</i></a></dd>
                            <dd id="todoNeedAcceptCount"><a href="manage#reportingFaults/list?state=4&userid=11"><img src="img/daiban/icon-report-need-accept.png">待验收<i class="num">0</i></a></dd>
                            <dd id="todoMaintainCount"><a href="manage#maintainTask/completeList?mainPage=maintainTask/list"><img src="img/daiban/2.png">待养护<i class="num">0</i></a></dd>
                            <dd id="todoInventoryCountCount"><a href="manage#deviceInventory/mineList?mainPage=deviceInventory/list"><img src="img/daiban/3.png">待盘点<i class="num">0</i></a></dd>
                            <dd id="todoReportAssignCount"><a href="manage#reportingFaults/list?state=1"><img src="img/daiban/4.png">待分派<i class="num">0</i></a></dd>
                            <dd id="todoScrapCount"><a href="manage#scrap/auditList?mainPage=scrap/list"><img src="img/daiban/5.png">报废审批<i class="num">0</i></a></dd>
                            <dd id="todoPurchasePlanCount"><a href="manage#pur_plan/auditList?mainPage=pur_plan/index"><img src="img/daiban/12.png">采购计划<i class="num">0</i></a></dd>
                            <dd id="todoPickingCount"><a href="manage#stkPicking/auditList?mainPage=stkPicking/index"><img src="img/daiban/7.png">领料审批<i class="num">0</i></a></dd>
                            <dd id="todoAllocationCount"><a href="manage#allocation/auditList?mainPage=allocation/list"><img src="img/daiban/8.png">调拨审批<i class="num">0</i></a></dd>
                            <dd id="todoDevSoldCount"><a href="manage#devSold/auditList?mainPage=devSold/index"><img src="img/daiban/9.png">变卖审批<i class="num">0</i></dd>
                            <dd id="todoCommissionRepairCount"><a href="manage#commissionRepair/auditList?mainPage=commissionRepair/index"><img src="img/daiban/10.png">委外审批<i class="num">0</i></a></dd>
                            <dd id="todoPatrolCount"><a href="manage#patrolTask/mineList?state_not_in=9&mainPage=patrolTask/index"><img src="img/daiban/11.png">待巡检<i class="num">0</i></a></dd>
                            <dd id="todoPurchaseCount"><a href="manage#purchase/auditList?mainPage=purchase/index"><img src="img/daiban/6.png">采购审批<i class="num">0</i></a></dd>
                            <dd id="todoMvTaskCount"><a href="manage#mv_task/mylist?mainPage=mv_task/list&result=0"><img src="img/device/mv_task.png">计量核查<i class="num">0</i></a></dd>
                        </div>
                    </dl>
                </li>
                &lt;!&ndash;消息&ndash;&gt;
                <li class="news">
                    <a href="manage#message/list"><span class="iconfont icon-news"></span></a>
                    <div>消息</div>
                    <i class="GetUnReadCount">0</i>
                </li>
                &lt;!&ndash;主页&ndash;&gt;
                <li class="index">
                    <a href="manage#manage/welcome"><span class="iconfont icon-index"></span></a>
                    <div>主页</div>
                </li>
                &lt;!&ndash;大屏看板&ndash;&gt;
                <li class="index" onclick="fs()">
                    <a  href="javascript:void 0;"><span class="iconfont icon-shuju"></span></a>
                    <div class="margin0">大屏看板</div>
                </li>-->
            </ul>
        </div>
        <style>
            .fream-first-menu{
                float: left;
                height:60px;
                margin-left:100px;
            }
            .fream-first-menu ul li{
                height: 60px;
                float: right;
                position: relative;
                width:90px;
                color: white;
                padding:12px;
            }
            .fream-first-menu ul li:hover{
                background:#69BBF6;
                cursor: pointer;
            }
            .fream-first-menu ul li span{
                display:block;
                height:25px;
                width:100%;
                text-align: center;
            }
            .active-first-menu-color{
                background:#69BBF6
            }

        </style>
        <div class="fream-first-menu">
            <ul>
            </ul>
        </div>
    </div>
    <!--**********左侧导航栏**********-->
    <div class="div-left" style="font-family: 微软雅黑;display: none">
        <!--**********导航栏二**********-->
        <ul class="left-menu left-menu-one sidebar-menu" style="display: none">
            <!-- 	    <a href="manage#manage/welcome"> -->
            <li class="menu-p" onclick="changeMenu(this)">
                <span class="zy-phone">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AMC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><!-- <span style="color: rgb(166, 170, 175); font-size: 16px;" class="glyphicon glyphicon-home"></span>首页 -->
                <img class="changeMenu_shousuo changeMenu iconfont " alt=""   style="display: inline-block;position: relative;right:-23px;"></li>
            </li>
            <!--**********导航栏二(一级菜单)**********-->
            <#list menuList as mainMenu>
            <li class="menu-p" data-id="${mainMenu.id}" >
                <span  class="${mainMenu.icon!""}" ></span>${mainMenu.name}
                <span class="title-right glyphicon glyphicon-menu-right"></span>
            </li>

            <ul class="menu-s" data-id="${mainMenu.id}">
                <!--**********导航栏二(二级级菜单)**********-->
                <#list mainMenu.subMenus as secondMenu>
                <li class="menu-s-item">
                    <a href="javascript:" class="addTabPage" title="${secondMenu.name}" data-code="${secondMenu.id}" data-href="${secondMenu.dataUrl}" data-tab-id="tabpanel-${secondMenu.id}">
                    <img class="list-style" src="${static}/${secondMenu.imgUrl!""}">${secondMenu.name}
                    </a>
                </li>
            </#list>
        </ul>
    </#list>
    </ul>
    <!--**********导航栏一**********-->
    <ul class="left-menu-two" style="display: none">
        <li class="menu-two-li-p" style="cursor: pointer;" onclick="changeMenu(this)">
            <img class="changeMenu_zhankai changeMenu iconfont "  ></li>
        <!--**********导航栏一(一级菜单)**********-->
        <#list menuList as mainMenu>
        <li class="menu-two-li-p" data-id="${mainMenu.id}"  data-index="${mainMenu.sortNo!""}" data-url="" >
            <span  class="${mainMenu.icon!""}" style="font-size:20px;line-height:44px;"></span>
            <!--<span class="menu-two-li-title">${mainMenu.name!""}</span>-->
        </li>
    </#list>
    </ul>
    <div class="menu-sun-content" style="display: none; ">
        <!--**********导航栏一(二级菜单)**********-->
        <#list menuList as mainMenu>
        <ul class="menu-two-ul-s" data-pid="${mainMenu.id}" >
            <li class="menu-two-ul-item" data-title=""  data-pid="${mainMenu.id}"  data-url="" >
                <img class="list-style"  >${mainMenu.name}</li>
            <#list mainMenu.subMenus as secondMenu>
            <a  href="javascript:" class="menu-sun-a addTabPage" title="${secondMenu.name}" data-code="${secondMenu.id}" data-href="${secondMenu.dataUrl}" data-tab-id="tabpanel-${secondMenu.id}">
                <li class="menu-two-ul-item" data-title="${secondMenu.name}"  data-pid="${mainMenu.id}"  data-url="${secondMenu.dataUrl}" >
                    <img class="list-style" src="${static}/${secondMenu.imgUrl}" >${secondMenu.name}</li>
            </a>
        </#list>
        </ul>
    </#list>
</div>
</div>
<!--**********右侧主页面**********-->
<div class="div-main-p">
    <div id="tabpanel"></div>
</div>

</div>
</body>
<script type="text/javascript" src="${static}/js/btn.js" ></script>
<script type="text/javascript">


    var LAYER_WINDOW_FIVE_ROW_HEIGHT = "450px";

    var LAYER_WINDOW_EIGHT_ROW_HEIGHT = "605px";

    var todoList = $("#todoList");
    function initTodoList(){
        $.post("http://demo.windasoft.com:8080/windaedm/manage/getTodoCount", {}, function(data){
            // alert("initTodoList:"+data);
            if(data.code == 0){
                var map = data.data;

                var PROCESS_TYPE_PICK = map.PROCESS_TYPE_PICK || 0;
                var PROCESS_TYPE_SCRAP = map.PROCESS_TYPE_SCRAP || 0;
                var PROCESS_TYPE_ALLOCATION = map.PROCESS_TYPE_ALLOCATION || 0;
                var PROCESS_TYPE_PURCHASE = map.PROCESS_TYPE_PURCHASE || 0;
                var PROCESS_TYPE_COMMISSION_REPAIR = map.PROCESS_TYPE_COMMISSION_REPAIR || 0;
                var PROCESS_TYPE_DEV_SOLD = map.PROCESS_TYPE_DEV_SOLD || 0;

                var PROCESS_TYPE_PUR_PLAN = map.PROCESS_TYPE_PUR_PLAN || 0;

                var TODO_COUNT_REPORT_ASSIGN = map.TODO_COUNT_REPORT_ASSIGN || 0;
                var TODO_COUNT_REPAIR = map.TODO_COUNT_REPAIR || 0;
                var TODO_COUNT_REPORT_NEED_ACCEPT = map.TODO_COUNT_REPORT_NEED_ACCEPT || 0;

                var TODO_COUNT_MAINTAIN = map.TODO_COUNT_MAINTAIN || 0;
                var TODO_COUNT_PATROL = map.TODO_COUNT_PATROL || 0;

                var TODO_COUNT_INVENTORY_COUNT = map.TODO_COUNT_INVENTORY_COUNT || 0;

                var TODO_COUNT_COUNT = map.TOTAL_COUNT;

                var TODO_COUNT_MV_TASK = map.TODO_COUNT_MV_TASK;


                //权限sql无对应具体的模块权限，则按整个controller来判断
                var CODE_MENU_MAP = {'ScrapController':'ScrapController'
                    ,'AllocationController':'AllocationController'
                    ,'PurPlanController':'PurPlanController'
                    ,'PurPurchaseController':'PurPurchaseController'
                    ,'StkPickingController':'StkPickingController'
                    ,'CommissionRepairController':'CommissionRepairController'
                    ,'DevSoldController':'DevSoldController'
                    ,'ReportingFaultsController':'ReportingFaultsController'
                    ,'MaintainTaskController':'MaintainTaskController'
                    ,'PatrolTaskController':'PatrolTaskController'
                    ,'DeviceInventoryController':'DeviceInventoryController'
                    ,'Mv_TaskController':'Mv_TaskController'};

                function checkHasPower(code){
                    if(g_usermenu.indexOf(code.toLowerCase())>-1){
                        return true;
                    }else{
                        return false;
                    }
                }


                var noTodo = $("#noTodo");
                todoList.find("dd").hide();
                if(TODO_COUNT_COUNT == 0){
                    $("#todoCount").hide();
                    noTodo.show();
                }else {
                    $("#todoCount").show().text(TODO_COUNT_COUNT > 99? "99+": TODO_COUNT_COUNT);
                    if(PROCESS_TYPE_COMMISSION_REPAIR > 0 && checkHasPower(CODE_MENU_MAP["CommissionRepairController"])){
                        $("#todoCommissionRepairCount").show().find(".num").text(PROCESS_TYPE_COMMISSION_REPAIR > 99? "99+": PROCESS_TYPE_COMMISSION_REPAIR);
                    }
                    if(PROCESS_TYPE_DEV_SOLD > 0 && checkHasPower(CODE_MENU_MAP["DevSoldController"])){
                        $("#todoDevSoldCount").show().find(".num").text(PROCESS_TYPE_DEV_SOLD > 99? "99+": PROCESS_TYPE_DEV_SOLD);
                    }
                    if(PROCESS_TYPE_PICK > 0 && checkHasPower(CODE_MENU_MAP["StkPickingController"])){
                        $("#todoPickingCount").show().find(".num").text(PROCESS_TYPE_PICK > 99? "99+": PROCESS_TYPE_PICK);
                    }
                    if(PROCESS_TYPE_SCRAP > 0 && checkHasPower(CODE_MENU_MAP["ScrapController"])){
                        $("#todoScrapCount").show().find(".num").text(PROCESS_TYPE_SCRAP > 99? "99+": PROCESS_TYPE_SCRAP);
                    }
                    if(PROCESS_TYPE_ALLOCATION > 0 && checkHasPower(CODE_MENU_MAP["AllocationController"])){
                        $("#todoAllocationCount").show().find(".num").text(PROCESS_TYPE_ALLOCATION > 99? "99+": PROCESS_TYPE_ALLOCATION);
                    }
                    if(PROCESS_TYPE_PURCHASE > 0 && checkHasPower(CODE_MENU_MAP["PurPurchaseController"])){
                        $("#todoPurchaseCount").show().find(".num").text(PROCESS_TYPE_PURCHASE > 99? "99+": PROCESS_TYPE_PURCHASE);
                    }
                    if(PROCESS_TYPE_PUR_PLAN > 0 && checkHasPower(CODE_MENU_MAP["PurPlanController"])){
                        $("#todoPurchasePlanCount").show().find(".num").text(PROCESS_TYPE_PUR_PLAN > 99? "99+": PROCESS_TYPE_PUR_PLAN);
                    }

                    if(TODO_COUNT_REPORT_ASSIGN > 0 && checkHasPower(CODE_MENU_MAP["ReportingFaultsController"])){
                        $("#todoReportAssignCount").show().find(".num").text(TODO_COUNT_REPORT_ASSIGN > 99? "99+": TODO_COUNT_REPORT_ASSIGN);
                    }
                    if(TODO_COUNT_REPORT_NEED_ACCEPT > 0 && checkHasPower(CODE_MENU_MAP["ReportingFaultsController"])){
                        $("#todoNeedAcceptCount").show().find(".num").text(TODO_COUNT_REPORT_NEED_ACCEPT > 99? "99+": TODO_COUNT_REPORT_NEED_ACCEPT);
                    }

                    if(TODO_COUNT_REPAIR > 0 && checkHasPower(CODE_MENU_MAP["ReportingFaultsController"])){
                        $("#todoRepairCount").show().find(".num").text(TODO_COUNT_REPAIR > 99? "99+": TODO_COUNT_REPAIR);
                    }

                    if(TODO_COUNT_MAINTAIN > 0 && checkHasPower(CODE_MENU_MAP["MaintainTaskController"])){
                        $("#todoMaintainCount").show().find(".num").text(TODO_COUNT_MAINTAIN > 99? "99+": TODO_COUNT_MAINTAIN);
                    }
                    if(TODO_COUNT_PATROL > 0 && checkHasPower(CODE_MENU_MAP["PatrolTaskController"])){
                        $("#todoPatrolCount").show().find(".num").text(TODO_COUNT_PATROL > 99? "99+": TODO_COUNT_PATROL);
                    }
                    if(TODO_COUNT_INVENTORY_COUNT > 0 && checkHasPower(CODE_MENU_MAP["DeviceInventoryController"])){
                        $("#todoInventoryCountCount").show().find(".num").text(TODO_COUNT_INVENTORY_COUNT > 99? "99+": TODO_COUNT_INVENTORY_COUNT);
                    }
                    if(TODO_COUNT_MV_TASK > 0 && checkHasPower(CODE_MENU_MAP["Mv_TaskController"])){
                        $("#todoMvTaskCount").show().find(".num").text(TODO_COUNT_MV_TASK > 99? "99+": TODO_COUNT_MV_TASK);
                    }
                }
            }
        })
    }
    initTodoList();
    //	点击admin
    $(function(){

        $(".fream-admin").mouseenter(function(){
            $(this).find(".admin-hover").show(300);
        });
        $(".fream-admin").mouseleave(function(){
            $(this).find(".admin-hover").stop().hide(300);
        });

        js.initTabPage("tabpanel", {
            height: function() {
                var g = $(window).height(),
                    e = $("#fream-top").outerHeight(),
                    d = g - e;
                console.log("height:"+d);
                return d < 300 ? 300 : d
            }
        });
        $(window).resize();
        js.addTabPage(null, '<i class="fa fa-home" style="font-size: 16px;margin-top: -2px;"></i> ' + '主页', '/sys/welcome', false, false);


        window.isMenuClickFlag = false;
        $(window).bind("hashchange", function(i) {
            if (!window.isMenuClickFlag) {
                var h = window.location.hash.replace("#", "");
                if (h && h != "" && h != window.location.pathname) {
                    var j = js.text("tabpanel.newTabPage"),
                        k = h.lastIndexOf("#");
                    if (k != -1) {
                        j = h.substring(k + 1);
                        h = h.substring(0, k)
                    }
                    var g = $('.sidebar-menu a.addTabPage[data-href="' + h + '"]:eq(0)');
                    if (g && g.length > 0) {
                        g.click()
                    } else {
                        if ($(".sidebar-menu").length > 0) {
                            js.addTabPage(null, js.decodeUrl(j), h)
                        }
                    }
                } else {
                    var f = $(".sidebar-menu > li:eq(0):not(.active) > a:eq(0)");
                    if (f.data("href") == "blank") {
                        f.click()
                    }
                }
            }
            window.isMenuClickFlag = false
        }).trigger("hashchange");

    });
    // 	点击换肤按钮
    $(function(){
        $("body").on("click",".fream-skin",function(){
            if($(this).children(".skin").is(":hidden")){
                $(this).children(".skin").show();
            }else{
                $(this).children(".skin").hide();
            }
        });
        $("body").on("click",".skin li",function(){
            var index=parseInt($(this).index());
            skin(index);
        });

    });


    $(function(){
        //是否存在锚点
        /*if(window.location.hash != ""){
            var inithash = window.location.hash.substr(1);
            var uri = inithash;
            var index = inithash.indexOf("/");
            if(index!= -1){
                inithash = inithash.substring(0, index);
            }
            //给选中的item加选中样式（如果页面发生跳转）
            $(".div-left-item").removeClass("left-item-selected");
            $(".div-left-item[data-url='"+uri+"']").addClass("left-item-selected");

            //loadHtml(uri,'');
        }
        initmenu();
        $(".time").timeago();*/
    })
    //监听锚点变换事件
    /*window.onhashchange = function(){
        if(window.location.hash != ""){
            var inithash = window.location.hash.substr(1);
            var uri = inithash;
            var index = inithash.indexOf("/");
            if(index!= -1){
                inithash = inithash.substring(0, index);
            }
            //给选中的item加选中样式（如果页面不发生跳转）
            $(".div-left-item").removeClass("left-item-selected");
            $(".div-left-item[data-url='"+uri+"']").addClass("left-item-selected");
            //loadHtml(uri,'');
        }
        initmenu();
    };*/



    function changePgaeContentStyles(){
        var h1=$(window).height();
        var h2=$(".page-header").height();
        var h3=$(".page-button").height();
        $(".").css("min-height",h1-66);
        var h4=$(".div-main").height();
        $(".page-content-s").css("min-height",h4-h2-15);
        $(".page-content").css("min-height",h4-h2-15);
        $(".page-content-main").css("min-height",h1-h2-h3-120);
        var h5=$(".page-content-main").height();
        $(".page-content-left").css("min-height",h5-20);
        $(".page-content-right").css("min-height",h5-20);
        var w=$(".page-content-main").width();
        var w1=$(".page-content-left").width();
        $(".page-content-right").width(w-w1-65);
        $(window).resize(function(){
            var h1=$(window).height();
            var h2=$(".page-header").height();
            var h3=$(".page-button").height();
            $(".div-main").css("min-height",h1-66);
            var h4=$(".div-main").height();
            $(".page-content-s").css("min-height",h4-h2-15);
            $(".page-content").css("min-height",h4-h2-15);
            $(".page-content-main").css("min-height",h1-h2-h3-120);
            var w=$(".page-content-main").width();
            var w1=$(".page-content-left").width();
            $(".page-content-right").width(w-w1-60);
        });
    }

    //如果第一次登录
    if(location.href.indexOf("#")<0){
        //alert("location:"+location.href)
        //loadHtml("manage/welcome","");
    }

    //菜单树（增加对应的hover事件）
    $(".div-left-item").hover(
        function(){
            $(this).addClass("active");
        },function(){
            $(this).removeClass("active");
        }
    );
    //菜单树（增加对应的hover事件）
    $(".menu-s-item").click(function(){
        $(".menu-s-item").removeClass("active");
        $(this).addClass("active");
    })
    $("body").on("click",".menu-p",function(){
        $(".menu-p").removeClass("active");
        $(".menu-s").slideUp(200);
        $(".title-right").removeClass("glyphicon-menu-down");
        if($(this).index()==0){
            return;
        }else if($(this).next(".menu-s").is(":hidden")){
            $(this).addClass("active");
            $(this).find(".title-right").addClass("glyphicon-menu-down");
            $(this).next(".menu-s").slideDown(200);
        }else{
            $(this).removeClass("active");
            $(this).find(".title-right").removeClass("glyphicon-menu-down");
            $(this).next(".menu-s").slideUp(200);
        }
    })
    $(".user-setting").hover(function(){
        $(this).addClass("bg-style1");
    },function(){
        if($(".user-item").is(":hidden")){
            $(this).removeClass("bg-style1");
        }
    })
    $(".user-item-list").hover(function(){
        $(this).addClass("bg-style2");
        $(this).css("color","#1ABB9C");
    },function(){
        $(this).removeClass("bg-style2");
        $(this).css("color","#71879E");
    })


    $(".user-setting").click(function(){
        if($(".user-item").is(":hidden")){
            $(this).addClass("bg-style1");
            $(this).find("span").removeClass("glyphicon-chevron-down");
            $(this).find("span").addClass("glyphicon-chevron-up");
            $(".user-item").show("normal");
        }else{
            $(".user-item").hide("normal");
            $(this).find("span").removeClass("glyphicon-chevron-up");
            $(this).find("span").addClass("glyphicon-chevron-down");
            //(".user-item").removeClass("bg-style1");
        }
    })

    //不论鼠标指针穿过被选元素或其子元素，都会触发 mouseover 事件。
    //只有在鼠标指针穿过被选元素时，才会触发 mouseenter 事件。
    $(".user-setting").bind("mouseenter",function(){
        $(this).addClass("bg-style1");
        $(this).find("span").removeClass("glyphicon-chevron-down");
        $(this).find("span").addClass("glyphicon-chevron-up");
        $(".user-item").show("normal");

    })

    //不论鼠标指针离开被选元素还是任何子元素，都会触发 mouseout 事件。
    //只有在鼠标指针离开被选元素时，才会触发 mouseleave 事件。
    $(".welcome-right").bind("mouseleave",function(){
        $(".user-item").stop().hide("normal");
        $(".user-setting").find("span").removeClass("glyphicon-chevron-up");
        $(".user-setting").find("span").addClass("glyphicon-chevron-down");
        $(".user-setting").removeClass("bg-style1");
    })


    /**
     * 隐藏左边菜单
     */
    function hideleft(){
        if($(".div-left").hasClass("div-left-hide")){
            $(".div-left").removeClass("div-left-hide");
            $(".div-main-p").removeClass("div-main-p-show");
        }else{
            $(".div-left").addClass("div-left-hide");
            $(".div-main-p").addClass("div-main-p-show");
        }
    }

    $(".menu-p").hover(function(){
        $(this).find("span").css("color","white");
        //$(this).find("img").attr("src","img/device/shousuo1.png");
    },function(){
        $(this).find("span").css("color","#A6AAAF");
        //$(this).find("img").attr("src","img/device/shousuo.png");
    })




    /**
     * 初始化菜单模式
     */
    var shousuo = "http://demo.windasoft.com:8080/windaedm/img/device/shousuo.png";
    var zhankai = "http://demo.windasoft.com:8080/windaedm/img/device/zhankai.png";
    var initMenuMode = function(){
        var mode = $.cookie("http://demo.windasoft.com:8080/windaedm/showMode");
        if(mode=="zhaikai"){
            $.cookie("http://demo.windasoft.com:8080/windaedm/showMode", "zhaikai", {expires : 7});
            $(".changeMenu").attr("src",shousuo);
            $(".div-left").css({"width":"190px"});
            $(".div-main-p").css({"margin-left":"190px"});
            var width=$(window).width();
            $(".div-main-p").css({"width":width-190});
            //下面先隐藏再显示，是为了不让布局闪乱
            $(".div-main-p").show();
            $(".div-left").show();
            $(".left-menu-one").show();
        }else{
            var h=$(window).height();
            $.cookie("http://demo.windasoft.com:8080/windaedm/showMode", "shousuo", {expires : 7});
            $(".changeMenu").attr("src",zhankai);
            var width=$(window).width();

            if(h<880){
                $(".div-left").css({"width":"50px"});
                $(".div-main-p").css({"margin-left":"50px"});
                $(".menu-two-li-p").css("padding","0px")
                $(".div-main-p").css({"width":width-50});
            }
            else{
                $(".div-left").css({"width":"60px"});
                $(".div-main-p").css({"margin-left":"60px"});
                $(".div-main-p").css({"width":width-60});
            }

            //下面先隐藏再显示，是为了不让布局闪乱
            $(".div-main-p").show();
            $(".div-left").show();
            $(".left-menu-two").show();
        }
    }

    /**
     * 切换菜单模式
     */
    var changeMenu = function(that){
        var src = $(that).find("img").attr("src");
        var width=$(window).width();
        if(src == shousuo){
            $.cookie("http://demo.windasoft.com:8080/windaedm/showMode", "shousuo", {expires : 7});
            $(".changeMenu").attr("src",zhankai);
            $(".left-menu-one").hide();
            $(".left-menu-two").show();
            var h=$(window).height();
            if(h<880){
                $(".div-left").css({"width":"50px"});
                $(".div-main-p").css({"margin-left":"50px"});
                $(".div-main-p").css({"width":width-50});
            }
            else{
                $(".div-left").css({"width":"60px"});
                $(".div-main-p").css({"margin-left":"60px"});
                $(".div-main-p").css({"width":width-60});
            }


        }else{
            $.cookie("http://demo.windasoft.com:8080/windaedm/showMode", "zhaikai", {expires : 7});
            console.log($.cookie("http://demo.windasoft.com:8080/windaedm/showMode"));
            $(".changeMenu").attr("src",shousuo);
            $(".left-menu-one").show();
            $(".left-menu-two").hide();
            $(".div-left").css({"width":"190px"});
            $(".div-main-p").css({"margin-left":"190px"});
            $(".div-main-p").css({"width":width-190});
        }
        $(window).resize();
        //reloadFirstPage();
    }
    //显示二级菜单


    $("body").on('mouseover mouseout','.menu-two-li-p',function(event){
        var windowHeight = $(window).height();
        var index = parseInt($(this).attr("data-index")||0);
        var pid = $(this).attr("data-id");
        var scrollTop = parseInt($(".left-menu-two").offset().top);
        var h=$(window).height();
        if(h<880){
            var  top = parseInt(index)*45+22+60-50;
        }else{
            var top = parseInt(index)*53+30+60-50;
        }



        $('.menu-two-li-p').removeClass("hover-sun-li");
        $(this).addClass("hover-sun-li");

        if(event.type == "mouseover"){
            $(".menu-two-ul-s").hide();
            var menuTwoUlSHeight = $(".menu-two-ul-s[data-pid='"+pid+"']").show().height();
            if(windowHeight - top < (menuTwoUlSHeight)){
                top = windowHeight - (menuTwoUlSHeight );
            }
            var h=$(window).height();
            if(h<880){
                $(".menu-sun-content").css({"top":top+"px","left":"50px"}).show();
            }
            else{
                $(".menu-sun-content").css({"top":top+"px","left":"60px"}).show();
            }

        }
        else if(event.type == "mouseout"){
            $('.menu-two-li-p').removeClass("hover-sun-li");
        }
    })
    $("body").on('mouseleave','.menu-two-ul-s',function(event){
        if(event.type == "mouseleave"){
            $(".menu-two-ul-s").hide();
            $('.menu-two-li-p').removeClass("hover-sun-li");
        }
    })
    $("body").on('mouseover mouseout','.menu-two-ul-item',function(event){
        if(event.type == "mouseover"){
            $(this).addClass("hover-sun-li");
            $(this).find("a").addClass("hover-sun-li");
        }
        else if(event.type == "mouseout"){
            $(this).removeClass("hover-sun-li");
            $(this).find("a").removeClass("hover-sun-li");
        }
    })
    //初始化菜单模式
    initMenuMode();
    $(function(){
        var h=$(window).height();
        $(".first-page-content").height(h);
    });


    function fs(){
        $.ajaxSettings.async = false;
        $.get("manage/fullscreenIndex", {}, function(data){
            $(window).unbind();
            document.write(data);
            FullScreenManager.on();

        });
        $.ajaxSettings.async = true;
    }
    $(".div-left").mouseleave(function(){
        $(".menu-sun-content").hide();
    })

    $(".matter").mouseleave(function(){
        $(this).children("#todoList").hide();
    })
    $(".fream-skin").mouseleave(function(){
        $(this).children(".skin").hide();
    })
    function passwordedit(obj) {
        var $this = $(obj);
        var url = "${ctx}/user/passwordedit";
        js.addTabPage($this, '修改密码', url, true, true);
        //window1(null, "修改密码", "${ctx}/user/passwordedit", "500px", "250px", "");
    }
    function logout() {
        location = "/sys/logout";
    }
    //弹出layer窗口
    function window1(icon, title, url, width, heigth, type) {
        var title2 = title;
        if (!isEmpty(icon)) {
            title2 = '<img src="' + icon + '" width="20"/>' + title;
        }
        layer.open({
            type: 2,
            title: title2,
            maxmin: true,
            shadeClose: false, //点击遮罩层关闭
            shade: [0.1, '#fff'],
            area: [width + "", heigth + ""],
            offset: ['10px'],
            fixed: false,
            content: url
        });
    }
</script>

</html>
